package com.kitchen.ui.dialog.rank
{
	import com.kitchen.ui.box9grid.BetweenBox;
	import com.kitchen.ui.box9grid.InnerBox;
	import com.kitchen.ui.box9grid.OuterBox;
	import com.kitchen.ui.dialog.AbstractDialog;
	import com.kitchen.ui.dialog.DialogHeader;
	import com.kitchen.ui.dialog.com.StarIcon;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;

	public class RankDialog extends AbstractDialog
	{
		public function RankDialog(main:BitmapData, dialog:BitmapData, shoper:Object=null, shop:Object=null)
		{
			super(main, dialog, shoper, shop);
		}
		
		override protected function layout(cdata:Object):void{
			this.w = 680;
			this.h = 585;
			var outer:OuterBox = new OuterBox(this.dialogSkin, this.w, this.h-20);
			var between:BetweenBox = new BetweenBox(this.dialogSkin, this.w-20, this.h-110);
			var inner1:InnerBox = new InnerBox(this.dialogSkin, this.w-40, this.h-160);
			outer.x = 0;
			outer.y = 20;
			between.x = 10;
			between.y = 95;
			inner1.x = 20;
			inner1.y = 135;
			this.addChild(outer);
			this.addChild(between);
			this.addChild(inner1);
			var head:RankHead = new RankHead(this.mainSkin);
			head.x = (this.w-head.w)/2;
			head.y = 0;
			this.addChild(head);
			var lstar:StarIcon = new StarIcon(this.dialogSkin);
			var rstar:Bitmap = lstar.clone();
			lstar.x = (this.w -head.w-lstar.w)/2-25;
			rstar.x = this.w - (this.w -head.w-lstar.w)/2 + 25;
			this.addChild(lstar);
			rstar.scaleX = -1;
			this.addChild(rstar);
			
			this.addCloseButton();
		}
		
	}
}